package org.lawyer.admin.controller;

import org.lawyer.admin.domain.QctCustomer;
import org.lawyer.admin.service.QctCustomerService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/customer")
public class CustomerController {
  @Resource private QctCustomerService qctCustomerService;

  @PostMapping("/getCustomer")
  public QctCustomer getCustomer() {
    QctCustomer qctCustomer = new QctCustomer();
    qctCustomer.setExternalUserId("asdas");
    qctCustomer.setName("name");
    qctCustomerService.insert(qctCustomer);
    qctCustomerService.getProduct();
    return qctCustomer;
  }
}
